/**
 * ***********************************************************
 * Castor CodeGen 1.2.1 with SoNiC ME serialization patch:    
 * ***********************************************************
 * @author Adam Dec (SoNiC, snc85@o2.pl)
 * @since 14-12-2008
 * @update 14-02-2009
 * ***********************************************************
 * 
 * ***********************************************************
 * Changed Castor CodeGen 1.2 classes:
 *  - JType.java
 *  - CollectionMemberAndAccessorFactory.java
 *  - SourceFactory.java
 * ***********************************************************
 */

package com.sonic.mquotes.dto;

/**
 * Class MqPapMessage.
 * 
 * @version $Revision$ $Date$
 */
public class MqPapMessage implements de.enough.polish.io.Externalizable {


      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    /**
     * Field _id.
     */
    private java.lang.String _id;

    /**
     * Field _trans_id.
     */
    private int _trans_id;

    /**
     * keeps track of state for field: _trans_id
     */
    private boolean _has_trans_id;

    /**
     * Field _trans_date.
     */
    private java.util.Date _trans_date;

    /**
     * Field _priority.
     */
    private int _priority;

    /**
     * keeps track of state for field: _priority
     */
    private boolean _has_priority;

    /**
     * Field _lang.
     */
    private java.lang.String _lang;

    /**
     * Field _arch.
     */
    private int _arch;

    /**
     * keeps track of state for field: _arch
     */
    private boolean _has_arch;

    /**
     * Field _category_name.
     */
    private java.lang.String _category_name;

    /**
     * Field _date.
     */
    private java.util.Date _date;

    /**
     * Field _title.
     */
    private java.lang.String _title;

    /**
     * Field _text.
     */
    private java.lang.String _text;

    /**
     * Field _pap_category.
     */
    private com.sonic.mquotes.dto.Pap_category _pap_category;


      //----------------/
     //- Constructors -/
    //----------------/

    public MqPapMessage() {
        super();
    }


      //-----------/
     //- Methods -/
    //-----------/

    /**
     */
    public void deleteArch(
    ) {
        this._has_arch= false;
    }

    /**
     */
    public void deletePriority(
    ) {
        this._has_priority= false;
    }

    /**
     */
    public void deleteTrans_id(
    ) {
        this._has_trans_id= false;
    }

    /**
     * Returns the value of field 'arch'.
     * 
     * @return the value of field 'Arch'.
     */
    public int getArch(
    ) {
        return this._arch;
    }

    /**
     * Returns the value of field 'category_name'.
     * 
     * @return the value of field 'Category_name'.
     */
    public java.lang.String getCategory_name(
    ) {
        return this._category_name;
    }

    /**
     * Returns the value of field 'date'.
     * 
     * @return the value of field 'Date'.
     */
    public java.util.Date getDate(
    ) {
        return this._date;
    }

    /**
     * Returns the value of field 'id'.
     * 
     * @return the value of field 'Id'.
     */
    public java.lang.String getId(
    ) {
        return this._id;
    }

    /**
     * Returns the value of field 'lang'.
     * 
     * @return the value of field 'Lang'.
     */
    public java.lang.String getLang(
    ) {
        return this._lang;
    }

    /**
     * Returns the value of field 'pap_category'.
     * 
     * @return the value of field 'Pap_category'.
     */
    public com.sonic.mquotes.dto.Pap_category getPap_category(
    ) {
        return this._pap_category;
    }

    /**
     * Returns the value of field 'priority'.
     * 
     * @return the value of field 'Priority'.
     */
    public int getPriority(
    ) {
        return this._priority;
    }

    /**
     * Returns the value of field 'text'.
     * 
     * @return the value of field 'Text'.
     */
    public java.lang.String getText(
    ) {
        return this._text;
    }

    /**
     * Returns the value of field 'title'.
     * 
     * @return the value of field 'Title'.
     */
    public java.lang.String getTitle(
    ) {
        return this._title;
    }

    /**
     * Returns the value of field 'trans_date'.
     * 
     * @return the value of field 'Trans_date'.
     */
    public java.util.Date getTrans_date(
    ) {
        return this._trans_date;
    }

    /**
     * Returns the value of field 'trans_id'.
     * 
     * @return the value of field 'Trans_id'.
     */
    public int getTrans_id(
    ) {
        return this._trans_id;
    }

    /**
     * Method hasArch.
     * 
     * @return true if at least one Arch has been added
     */
    public boolean hasArch(
    ) {
        return this._has_arch;
    }

    /**
     * Method hasPriority.
     * 
     * @return true if at least one Priority has been added
     */
    public boolean hasPriority(
    ) {
        return this._has_priority;
    }

    /**
     * Method hasTrans_id.
     * 
     * @return true if at least one Trans_id has been added
     */
    public boolean hasTrans_id(
    ) {
        return this._has_trans_id;
    }

    /**
     * Reads data from byte stream.
     * 
     * @param dis
     * @throws java.io.IOException 
     */
    public void read(
            final java.io.DataInputStream dis)
    throws java.io.IOException {
        this._id = dis.readUTF();
this._trans_id = dis.readInt();
this._has_trans_id = dis.readBoolean();
this._trans_date = new java.util.Date(dis.readLong());
this._priority = dis.readInt();
this._has_priority = dis.readBoolean();
this._lang = dis.readUTF();
this._arch = dis.readInt();
this._has_arch = dis.readBoolean();
this._category_name = dis.readUTF();
this._date = new java.util.Date(dis.readLong());
this._title = dis.readUTF();
this._text = dis.readUTF();
this._pap_category = (com.sonic.mquotes.dto.Pap_category)de.enough.polish.io.Serializer.deserialize( dis );

    }

    /**
     * Sets the value of field 'arch'.
     * 
     * @param arch the value of field 'arch'.
     */
    public void setArch(
            final int arch) {
        this._arch = arch;
        this._has_arch = true;
    }

    /**
     * Sets the value of field 'category_name'.
     * 
     * @param category_name the value of field 'category_name'.
     */
    public void setCategory_name(
            final java.lang.String category_name) {
        this._category_name = category_name;
    }

    /**
     * Sets the value of field 'date'.
     * 
     * @param date the value of field 'date'.
     */
    public void setDate(
            final java.util.Date date) {
        this._date = date;
    }

    /**
     * Sets the value of field 'id'.
     * 
     * @param id the value of field 'id'.
     */
    public void setId(
            final java.lang.String id) {
        this._id = id;
    }

    /**
     * Sets the value of field 'lang'.
     * 
     * @param lang the value of field 'lang'.
     */
    public void setLang(
            final java.lang.String lang) {
        this._lang = lang;
    }

    /**
     * Sets the value of field 'pap_category'.
     * 
     * @param pap_category the value of field 'pap_category'.
     */
    public void setPap_category(
            final com.sonic.mquotes.dto.Pap_category pap_category) {
        this._pap_category = pap_category;
    }

    /**
     * Sets the value of field 'priority'.
     * 
     * @param priority the value of field 'priority'.
     */
    public void setPriority(
            final int priority) {
        this._priority = priority;
        this._has_priority = true;
    }

    /**
     * Sets the value of field 'text'.
     * 
     * @param text the value of field 'text'.
     */
    public void setText(
            final java.lang.String text) {
        this._text = text;
    }

    /**
     * Sets the value of field 'title'.
     * 
     * @param title the value of field 'title'.
     */
    public void setTitle(
            final java.lang.String title) {
        this._title = title;
    }

    /**
     * Sets the value of field 'trans_date'.
     * 
     * @param trans_date the value of field 'trans_date'.
     */
    public void setTrans_date(
            final java.util.Date trans_date) {
        this._trans_date = trans_date;
    }

    /**
     * Sets the value of field 'trans_id'.
     * 
     * @param trans_id the value of field 'trans_id'.
     */
    public void setTrans_id(
            final int trans_id) {
        this._trans_id = trans_id;
        this._has_trans_id = true;
    }

    /**
     * Writes data to byte stream.
     * 
     * @param dos
     * @throws java.io.IOException 
     */
    public void write(
            final java.io.DataOutputStream dos)
    throws java.io.IOException {
        dos.writeUTF( this._id );
dos.writeInt( this._trans_id );
dos.writeBoolean( this._has_trans_id );
dos.writeLong( this._trans_date.getTime() );
dos.writeInt( this._priority );
dos.writeBoolean( this._has_priority );
dos.writeUTF( this._lang );
dos.writeInt( this._arch );
dos.writeBoolean( this._has_arch );
dos.writeUTF( this._category_name );
dos.writeLong( this._date.getTime() );
dos.writeUTF( this._title );
dos.writeUTF( this._text );
de.enough.polish.io.Serializer.serialize( this._pap_category, dos );

    }

}
